﻿using System;
using System.Collections.Generic;

using System.Text;
using QUANLYCHAMCONG.DAO.DAO;
using QUANLYCHAMCONG.BL.Entities;
using System.Data;

namespace QUANLYCHAMCONG.BL.BUS
{
    public class LOAITGBUS
    {
        public LOAITGBUS() { }
        public static bool Insert(LOAITG tg)
        {
            LOAITGDAO dao = new LOAITGDAO();
            return dao.Insert(tg);
        }
        public static bool Update(LOAITG tg)
        {
            LOAITGDAO dao = new LOAITGDAO();
            return dao.Update(tg);
        }
        public static bool Delete(LOAITG tg)
        {
            LOAITGDAO dao = new LOAITGDAO();
            return dao.Delete(tg);
        }
        public static DataTable SelectAll()
        {
            LOAITGDAO dao = new LOAITGDAO();
            return dao.SelectALL();
        }
        public static DataTable SelectPK(LOAITG tg)
        {
            LOAITGDAO dao = new LOAITGDAO();
            return dao.SelectByPK(tg);
        }
        public static string GetID()
        {
            LOAITGDAO dao = new LOAITGDAO();
            return "TG" + dao.GetID().ToString();
        }
        public static DataTable SelectALLForCombo()
        {
            LOAITGDAO dao = new LOAITGDAO();
            return dao.SelectALLForCombobox();
        }
    }
}
